package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WorkshopMapper;
import com.ruoyi.system.domain.Workshop;
import com.ruoyi.system.service.IWorkshopService;

/**
 * 设备信息222Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-20
 */
@Service
public class WorkshopServiceImpl implements IWorkshopService 
{
    @Autowired
    private WorkshopMapper workshopMapper;

    /**
     * 查询设备信息222
     * 
     * @param id 设备信息222主键
     * @return 设备信息222
     */
    @Override
    public Workshop selectWorkshopById(Long id)
    {
        return workshopMapper.selectWorkshopById(id);
    }

    /**
     * 查询设备信息222列表
     * 
     * @param workshop 设备信息222
     * @return 设备信息222
     */
    @Override
    @DataScope(deptAlias = "w", userAlias = "u")
    public List<Workshop> selectWorkshopList(Workshop workshop)
    {
        return workshopMapper.selectWorkshopList(workshop);
    }

    /**
     * 新增设备信息222
     * 
     * @param workshop 设备信息222
     * @return 结果
     */
    @Override
    public int insertWorkshop(Workshop workshop)
    {
        return workshopMapper.insertWorkshop(workshop);
    }

    /**
     * 修改设备信息222
     * 
     * @param workshop 设备信息222
     * @return 结果
     */
    @Override
    public int updateWorkshop(Workshop workshop)
    {
        return workshopMapper.updateWorkshop(workshop);
    }

    /**
     * 批量删除设备信息222
     * 
     * @param ids 需要删除的设备信息222主键
     * @return 结果
     */
    @Override
    public int deleteWorkshopByIds(Long[] ids)
    {
        return workshopMapper.deleteWorkshopByIds(ids);
    }

    /**
     * 删除设备信息222信息
     * 
     * @param id 设备信息222主键
     * @return 结果
     */
    @Override
    public int deleteWorkshopById(Long id)
    {
        return workshopMapper.deleteWorkshopById(id);
    }
}
